home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Tele / Internet / MacHTTP 1.3.sit / MacHTTP 1.3 / MacHTTP Software / Scripts / search.script < prev   
MacBinary  |  1994-02-23  |  1.6 KB  |  [TEXT/ToyS]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: search.script

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Feb 23 09:54:43 1994, modified Wed Feb 23 09:54:43 1994, creator 'ToyS', type ASCII, 1106 bytes "search.script" , at 0x4d2 330 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ToyS]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 73 65 61 72 63 68 | 2e 73 63 72 69 70 74 00 |..search|.script.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 54 6f 79 | 53 01 00 00 00 00 00 00 |.TEXTToy|S.......|
|00000050| 00 00 00 00 00 04 52 00 | 00 01 4a a9 91 1e b3 a9 |......R.|..J.....|
|00000060| 91 1e b3 00 00 06 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 07 53 00 00 |........|.....S..|
|00000080| 2d 2d 20 54 68 69 73 20 | 73 63 72 69 70 74 20 64 |-- This |script d|
|00000090| 65 6d 6f 6e 73 74 72 61 | 74 65 73 20 61 63 63 65 |emonstra|tes acce|
|000000a0| 73 73 69 6e 67 20 73 65 | 61 72 63 68 61 62 6c 65 |ssing se|archable|
|000000b0| 20 66 69 6c 65 73 20 66 | 72 6f 6d 20 4d 61 63 48 | files f|rom MacH|
|000000c0| 54 54 50 2e 0d 2d 2d 20 | 28 57 68 61 74 20 69 74 |TTP..-- |(What it|
|000000d0| 20 72 65 61 6c 6c 79 20 | 73 68 6f 77 73 20 69 73 | really |shows is|
|000000e0| 20 68 6f 77 20 74 6f 20 | 70 61 73 73 20 61 72 67 | how to |pass arg|
|000000f0| 75 6d 65 6e 74 73 20 74 | 6f 20 41 70 70 6c 65 53 |uments t|o AppleS|
|00000100| 63 72 69 70 74 73 2e 29 | 0d 2d 2d 20 68 74 74 70 |cripts.)|.-- http|
|00000110| 5f 73 65 61 72 63 68 5f | 61 72 67 73 20 69 73 20 |_search_|args is |
|00000120| 61 20 70 72 65 64 65 66 | 69 6e 65 64 20 76 61 72 |a predef|ined var|
|00000130| 69 61 62 6c 65 20 74 68 | 61 74 20 69 73 20 70 61 |iable th|at is pa|
|00000140| 73 73 65 64 20 66 72 6f | 6d 20 74 68 65 20 73 65 |ssed fro|m the se|
|00000150| 72 76 65 72 0d 2d 2d 20 | 20 74 6f 20 74 68 65 20 |rver.-- | to the |
|00000160| 73 63 72 69 70 74 20 61 | 6e 64 20 63 6f 6e 74 61 |script a|nd conta|
|00000170| 69 6e 73 20 74 68 65 20 | 75 73 65 72 2d 73 75 70 |ins the |user-sup|
|00000180| 70 6c 69 65 64 20 61 72 | 67 75 6d 65 6e 74 73 2e |plied ar|guments.|
|00000190| 20 49 66 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 | If the |argument|
|000001a0| 73 0d 2d 2d 20 20 61 72 | 65 20 65 6d 70 74 79 2c |s.-- ar|e empty,|
|000001b0| 20 74 68 65 20 73 63 72 | 69 70 74 20 61 73 6b 73 | the scr|ipt asks|
|000001c0| 20 74 68 65 20 57 57 57 | 20 63 6c 69 65 6e 74 20 | the WWW| client |
|000001d0| 74 6f 20 70 72 6f 6d 70 | 74 20 66 6f 72 20 74 68 |to promp|t for th|
|000001e0| 65 6d 2e 20 0d 2d 2d 20 | 20 49 66 20 61 72 67 75 |em. .-- | If argu|
|000001f0| 6d 65 6e 74 73 20 77 65 | 72 65 20 70 61 73 73 65 |ments we|re passe|
|00000200| 64 2c 20 74 68 65 6e 20 | 74 68 65 20 73 63 72 69 |d, then |the scri|
|00000210| 70 74 20 62 65 68 61 76 | 65 73 20 61 63 63 6f 72 |pt behav|es accor|
|00000220| 64 69 6e 67 6c 79 2e 0d | 2d 2d 20 20 4e 6f 74 65 |dingly..|-- Note|
|00000230| 3a 20 74 68 65 20 3c 49 | 53 49 4e 44 45 58 3e 20 |: the <I|SINDEX> |
|00000240| 48 54 4d 4c 20 74 61 67 | 20 69 73 20 77 68 61 74 |HTML tag| is what|
|00000250| 20 74 65 6c 6c 73 20 74 | 68 65 20 63 6c 69 65 6e | tells t|he clien|
|00000260| 74 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 69 |t the do|cument i|
|00000270| 73 20 73 65 61 72 63 68 | 61 62 6c 65 0d 2d 2d 20 |s search|able.-- |
|00000280| 20 20 20 61 6e 64 20 61 | 72 67 75 6d 65 6e 74 73 | and a|rguments|
|00000290| 20 73 68 6f 75 6c 64 20 | 62 65 20 63 6f 6c 6c 65 | should |be colle|
|000002a0| 63 74 65 64 20 61 6e 64 | 20 70 61 73 73 65 64 2e |cted and| passed.|
|000002b0| 20 0d 0d 73 65 74 20 63 | 72 6c 66 20 74 6f 20 28 | ..set c|rlf to (|
|000002c0| 41 53 43 49 49 20 63 68 | 61 72 61 63 74 65 72 20 |ASCII ch|aracter |
|000002d0| 31 33 29 20 26 20 28 41 | 53 43 49 49 20 63 68 61 |13) & (A|SCII cha|
|000002e0| 72 61 63 74 65 72 20 31 | 30 29 0d 73 65 74 20 68 |racter 1|0).set h|
|000002f0| 74 74 70 5f 31 30 5f 68 | 65 61 64 65 72 20 74 6f |ttp_10_h|eader to|
|00000300| 20 22 48 54 54 50 2f 31 | 2e 30 20 32 30 30 20 4f | "HTTP/1|.0 200 O|
|00000310| 4b 22 20 26 20 63 72 6c | 66 20 26 20 22 53 65 72 |K" & crl|f & "Ser|
|00000320| 76 65 72 3a 20 4d 61 63 | 48 54 54 50 22 20 26 20 |ver: Mac|HTTP" & |
|00000330| 63 72 6c 66 20 26 20 c2 | 0d 09 22 4d 49 4d 45 2d |crlf & .|.."MIME-|
|00000340| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 22 20 26 20 |Version:| 1.0" & |
|00000350| 63 72 6c 66 20 26 20 22 | 43 6f 6e 74 65 6e 74 2d |crlf & "|Content-|
|00000360| 74 79 70 65 3a 20 74 65 | 78 74 2f 68 74 6d 6c 22 |type: te|xt/html"|
|00000370| 20 26 20 63 72 6c 66 20 | 26 20 63 72 6c 66 0d 09 | & crlf |& crlf..|
|00000380| 0d 69 66 20 68 74 74 70 | 5f 73 65 61 72 63 68 5f |.if http|_search_|
|00000390| 61 72 67 73 20 3d 20 22 | 22 20 74 68 65 6e 0d 09 |args = "|" then..|
|000003a0| 72 65 74 75 72 6e 20 68 | 74 74 70 5f 31 30 5f 68 |return h|ttp_10_h|
|000003b0| 65 61 64 65 72 20 26 20 | 22 3c 49 53 49 4e 44 45 |eader & |"<ISINDE|
|000003c0| 58 3e 3c 68 32 3e 50 6c | 65 61 73 65 20 65 6e 74 |X><h2>Pl|ease ent|
|000003d0| 65 72 20 74 68 65 20 6b | 65 79 77 6f 72 64 20 74 |er the k|eyword t|
|000003e0| 6f 20 73 65 61 72 63 68 | 20 66 6f 72 2e 3c 2f 68 |o search| for.</h|
|000003f0| 32 3e 22 0d 65 6c 73 65 | 20 69 66 20 68 74 74 70 |2>".else| if http|
|00000400| 5f 73 65 61 72 63 68 5f | 61 72 67 73 20 3d 20 22 |_search_|args = "|
|00000410| 68 65 6c 6c 6f 22 20 74 | 68 65 6e 0d 09 72 65 74 |hello" t|hen..ret|
|00000420| 75 72 6e 20 68 74 74 70 | 5f 31 30 5f 68 65 61 64 |urn http|_10_head|
|00000430| 65 72 20 26 20 22 3c 68 | 32 3e 48 65 6c 6c 6f 2c |er & "<h|2>Hello,|
|00000440| 20 68 6f 77 20 61 72 65 | 20 79 6f 75 3f 3c 2f 68 | how are| you?</h|
|00000450| 32 3e 22 0d 65 6c 73 65 | 0d 09 72 65 74 75 72 6e |2>".else|..return|
|00000460| 20 68 74 74 70 5f 31 30 | 5f 68 65 61 64 65 72 20 | http_10|_header |
|00000470| 26 20 22 3c 68 32 3e 53 | 6f 72 72 79 2c 20 49 20 |& "<h2>S|orry, I |
|00000480| 64 6f 6e 27 74 20 75 6e | 64 65 72 73 74 61 6e 64 |don't un|derstand|
|00000490| 20 27 22 20 26 20 c2 0d | 09 09 68 74 74 70 5f 73 | '" & ..|..http_s|
|000004a0| 65 61 72 63 68 5f 61 72 | 67 73 20 26 20 22 27 2e |earch_ar|gs & "'.|
|000004b0| 20 54 72 79 20 27 68 65 | 6c 6c 6f 27 20 69 6e 73 | Try 'he|llo' ins|
|000004c0| 74 65 61 64 2e 3c 2f 68 | 32 3e 22 0d 65 6e 64 20 |tead.</h|2>".end |
|000004d0| 69 66 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |if......|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 01 00 00 00 01 18 | 00 00 00 18 00 00 00 32 |........|.......2|
|00000510| 72 67 75 6d 65 6e 74 73 | 3a 3c 2f 68 32 3e 22 20 |rguments|:</h2>" |
|00000520| 26 20 68 74 74 70 5f 73 | 65 61 72 63 68 5f 61 72 |& http_s|earch_ar|
|00000530| 0d 73 65 61 72 63 68 2e | 73 63 72 69 70 74 02 00 |.search.|script..|
|00000540| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000550| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 a9 f8 f2 a1 00 00 | 00 00 00 00 01 4a 6e 63 |........|.....Jnc|
|00000580| 68 6f 72 73 0d 0d 73 65 | 74 20 66 69 6c 65 6c 69 |hors..se|t fileli|
|00000590| 73 74 20 74 6f 20 22 3c | 68 32 3e 46 69 6c 65 73 |st to "<|h2>Files|
|000005a0| 20 6f 6e 20 74 68 65 20 | 73 65 72 76 65 72 3a 3c | on the |server:<|
|000005b0| 2f 68 32 3e 3c 75 6c 3e | 22 0d 73 65 74 20 6c 69 |/h2><ul>|".set li|
|000005c0| 73 74 69 6e 67 20 74 6f | 20 28 6c 69 73 74 20 66 |sting to| (list f|
|000005d0| 6f 6c 64 65 72 20 66 69 | 6c 65 20 66 69 6c 65 5f |older fi|le file_|
|000005e0| 70 61 74 68 29 0d 72 65 | 70 65 61 74 20 77 69 74 |path).re|peat wit|
|000005f0| 68 20 69 20 66 72 6f 6d | 20 31 20 74 6f 20 74 68 |h i from| 1 to th|
|00000600| 00 00 00 14 00 7c 00 92 | 01 a6 03 2c 00 7c 00 83 |.....|..|...,.|..|
|00000610| 02 11 03 1d 00 00 00 00 | 00 00 01 00 00 00 01 18 |........|........|
|00000620| 00 00 00 18 00 00 00 32 | 00 ea aa e8 21 ca 00 00 |.......2|....!...|
|00000630| 00 1c 00 32 00 00 57 50 | 6f 73 00 00 00 0a 00 80 |...2..WP|os......|
|00000640| ff ff 00 00 00 00 00 ea | ab 58 00 00 00 00 00 00 |........|.X......|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+